This table shows the structure of a MIDI file of the type constructed by the "MIDI Builder" stack for Runtime Revolution. The first track contains information about the file as a whole, as well as meter, key sig., tempo, etc. Subsequent tracks contain the GM voice (instrument) and the MIDI event data (note on/off).
-Kurt Kaufman
HEX BYTES |
NAME/PURPOSE |
Constant or Variable |
|
|
|
4d 54 68 64 |
MThd ID |
c |
00 00 00 06 |
len of MThd chunk |
c |
00 01 |
format 1 |
c |
00 0x |
number of tracks |
v (tracks 2 or greater must contain note data, i.e. cannot be empty) |
04 00 |
1024 PPQN |
c |
4d 54 72 6b |
MTrk ID-track 1 |
c |
00 00 00 1a |
track 1 length (26 decimal) |
c |
00 |
empty |
c |
ff 58 04 xx xx xx xx |
meter |
v |
00 |
empty |
c |
ff 59 02 00 00 |
key sig. |
c |
00 |
empty |
c |
ff 51 03 xx xx xx |
tempo |
v |
a0 |
polyphonic status |
c |
00 |
empty |
c |
ff 2f 00 |
eof-track 1 |
c |
|
|
|
4d 54 72 6b |
MTrk ID-track 2 |
c |
00 00 xx xx |
track 2 length |
v |
00 |
empty |
c |
c0 xx |
program selection GM voice range 0-127 |
v (note use of c0 for track 2) |
00 |
empty |
c |
( ) |
note data |
v |
90 45 00 88 00 80 45 00 00 |
9 bytes silent note on/off to avoid end cutoff |
c (note use of 90 and 80 for track 2) |
ff 2f 00 |
eof track 2 |
c |
|
|
|
4d 54 72 6b |
MTrk ID-track 3 |
c |
00 00 xx xx |
track 3 length |
v |
00 |
empty |
c |
c1 xx |
program selection GM voice range 0-127 |
v (note use of c1 for track 3) |
00 |
empty |
c |
( ) |
note data |
v |
91 45 00 88 00 81 45 00 00 |
9 bytes silent note on/off to avoid end cutoff |
c (note use of 91 and 81 for track 3) |
ff 2f 00 |
eof track 3 |
c |